﻿#include "camera.hpp"
#include "opencv2/opencv.hpp"

int main()
{
    Camera mvcamera;
    cv::Mat img;
        
    if(mvcamera.InitCamera()!=0){
        std::cout<<"Failed to Init camera"<<std::endl;
    }
    waitKey(5);
    while (true){
        img=mvcamera.getImage();
        if(!img.empty())
        {
            
            cv::imshow("img",img);
        }
        else{
            std::cout<<"empty img "<<std::endl;
        }
        int input = cv::waitKey(1);
        if (input>=0) {
        break;
        }
    }
}